package cn.ahaiahaixx.supemarketonline.service;

import cn.ahaiahaixx.supemarketonline.model.TbUserModel;
import cn.ahaiahaixx.supemarketonline.utils.JsonMessage;

public interface UserService {

  JsonMessage login(TbUserModel model) throws Exception;

  /**
   * 得到登录信息
   * @param model
   * @return
   * @throws Exception
   */
  JsonMessage getUserInfo(TbUserModel model) throws Exception;

  /**
   * 登出
   * @param model
   * @return
   * @throws Exception
   */
  JsonMessage logout(TbUserModel model) throws Exception;

  /**
   * 用户注册
   * @param model
   * @return
   * @throws Exception
   */
  JsonMessage useradd(TbUserModel model) throws Exception;

  /**
   * 管理员修改
   * @param model
   * @return
   * @throws Exception
   */
  JsonMessage adminupdate(TbUserModel model) throws Exception;

  /**
   * 分页查询
   * @param model
   * @return
   * @throws Exception
   */
  JsonMessage queryAll(TbUserModel model) throws Exception;

  /**
   * 用户修改
   * @param model
   * @return
   * @throws Exception
   */
  JsonMessage userupdate(TbUserModel model) throws Exception;

  /**
   * 管理员删除
   * @param model
   * @return
   * @throws Exception
   */
  JsonMessage admindelete(TbUserModel model) throws Exception;

  /**
   * 管理员解封
   * @param model
   * @return
   * @throws Exception
   */
  JsonMessage nuadmindelete(TbUserModel model) throws Exception;

}
